package com.css.fxfzypg.modules.baseData.repository;

import com.css.fxfzypg.modules.baseData.queryParams.ReservoirQueryParams;
import com.css.fxfzypg.modules.baseData.entity.ReservoirEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * @author y1fan
 * @create 2022-08-15 15:23
 */
public interface ReservoirRepository {


    ReservoirEntity saveReservoir(ReservoirEntity reservoirEntity);

    ReservoirEntity findReservoirById(String dataReservoirId);

    Page<ReservoirEntity> getAllReservoirByParams(ReservoirQueryParams queryParams);


    void deleteReservoir(@Param("ids") List<Integer> ids);

    List<ReservoirEntity> exportExcel();

    void importExcel(List<ReservoirEntity> reservoirEntities);

    Integer countByCounty(String province, String city, String county);
    Integer countByCity(String province, String city);
    Integer countByProvince(String province);

    Integer countByProvinceAndYear(String provinceName, String taskYear);
}
